/**
 * 3
 *  
 * @Author : Ruoyu Wang
 * @DateTime : 24-10-23 上午9:57
 */

#include <iostream>
#include <vector>

using namespace std;

const int MOD = 1e9 + 7;

int main() {
    int n, k;
    cin >> n >> k;

    vector<vector<int>> f(n + 1, vector<int>(k + 1, 0));
    f[1][0] = 1;
    f[2][1] = 1;
    f[2][0] = 1;
    f[0][0] = 1;
    for (int i = 3; i <= n; i++) {
        for (int j = 0; j <= k; j++) {
            for (int l = 0; l <= i - 1 && j - l >= 0; l++) {
                f[i][j] = (f[i - 1][j - l] + f[i][j]) % MOD;
            }
        }
    }

    int res = 0;
    for (int j = 0; j <= k; ++j) {
        res = (res + f[n][j]) % MOD;
    }

    cout << res << endl;

    return 0;
}
